<!doctype html>
<html lang="zh-CN">
<head>
    <include file="include/head" title="确认订单" />
</head>

<body style="background:#f2f2f2">
	<div class="header-blank"></div>
    <div class="header">
		确认订单
		<span class="left">
			<a href="javascript:;" onclick="window.history.go(-1)"><span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span></a>
		</span>
	</div>
	<form method="post" action="{:U('Index/order')}" name="form" id="form">
		<div class="cart-main">
			<div class="cart-addr">
				<a href="{:U('Index/addr?act=select')}">
					<table>
						<tr>
							<td valign="top" width="50"><b>运至</b></td>
							<td align="left">
								<if condition="$addr neq ''">
								{:str_replace('||',' ', $addr['district'])} {$addr.addr}<br/>{$addr.name} {$addr.mobile}
								<else/>
								您还没有默认地址，点击添加
								</if>
							</td>
							<td valign="middle"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></td>
						</tr>
					</table>
				</a>
			</div>
			
			<div class="cart-product-title">
				<span class="right">
					<a href="{:U('Index/cart_edit?addr='.$_GET['addr'])}">
						<span class="glyphicon glyphicon-shopping-cart" aria-hidden="true"></span>
						编辑购物车
					</a>
				</span>
				订单信息
			</div>
			<volist name="list" id="vo">
			<div class="cart-item">
				<img src="{$vo.pic}" class="product" />
				<div class="title">{$vo.title}</div>
				<notempty name="vo['attr']">
				<div class="attr">属性：{$vo.attr}</div>
				</notempty>
				<div class="price"></div>
				<div class="nums">
					<span class="price">￥{$vo.price}</span> X 数量：{$vo.nums} 
				</div>
			</div>
			</volist>
			
			
			<div class="cart-msg">
				客户留言<br/>
				<textarea name="msg"></textarea>
			</div>
		</div>
		
		<div class="cart-checkout-blank"></div>
		<div class="cart-checkout">
			<input type="hidden" name="addr_id" value="{$addr.id}" />
			总计：<span class="red">￥{$total}</span>
			<div class="checkout-btn">
				<a href="javascript:;" onclick="order_submit()">提交订单</a>
				<script>
				function order_submit(){
					<if condition="$list eq ''">
						alert('购物车还没有东西哦');
					<elseif condition="$addr['id'] eq ''">
					alert('请先选择收货地址');
					<else/>
					form.submit();
					</if>
				}
				</script>
			</div>
		</div>
	</form>
	<include file="include/bottom" />

</body>
</html>